package com.translation;

import java.util.Iterator;

public class ArrayInterator<T> implements Iterator<T> {

	protected T[] array;
	protected int index;

	public ArrayInterator(T[] array) {
		this.array = array;
	}

	@Override
	public boolean hasNext() {
		return index < array.length;
	}

	@Override
	public T next() {
		return hasNext() ? array[index++] : null;
	}

	@Override
	public void remove() {
	}

}
